#include <iostream>
using namespace std;

#include "workerManager.h"
//#include "workerManager.cpp"

int main()
{
    //实例化管理者对象
    WorkerManager wm;

    int choice = 0; //用户的选择

    while (true)
    {
        //调用展示菜单的成员函数
        wm.showMenu();
        cout << "请输入您的选择：" << endl;
        cin >> choice;

        switch (choice)
        {
        case 0: //退出系统
            wm.ExitSystem();
            break;
        case 1: //增加职工
            wm.addEmp();
            break;
        case 2: //显示职工
            wm.show_Emp();
            break;
        case 3: //删除职工
            wm.del_Emp();
            break;
        case 4: //修改职工
            wm.mod_Emp();
            break;
        case 5: //查找职工
            wm.find_Emp();
            break;
        case 6: //排序职工
            wm.sort_Emp();
            break;
        case 7: //清空文档
            wm.clean_file();
            break;
        default:
            system("clear");
            break;
        }
    }
    return 0;
}